<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            display: none;
        }
    </style>
</head>
<body>
    <div class="box">123</div>
    <ul>
        <li>没用了</li>
    </ul>
    <script>
        const ul=document.querySelector('ul')
        ul.removeChild(ul.children[0])
    </script>
</body>
</html>